
import AbsControler from '../abscontroler.js'
import {LGXEnums} from '../../common/sysenum.js'

import snapsvc from '../../service/pointsnapsvc.js'
var svc = snapsvc.PointSnapSvc;


class PickPointControler extends AbsControler.AbsControler {
    constructor(datamanger) {
        super(datamanger);
    }

    act2Mouse(mosEvnt, worldPos) {
        svc.snapMouse2OtherGraphPTFeature (this.dataManger, worldPos,false,true) ;
        let ret = null;
        if (mosEvnt.type == LGXEnums.LGXMouseMode.LMouseDown) {
            ret = "selPoint";
        }
        else if (mosEvnt.type == LGXEnums.LGXMouseMode.LMouseUp) {
            ret = "selPoint";
        }
        else if (mosEvnt.type == LGXEnums.LGXMouseMode.mouseMove) {
            console.log("PickPointControler find dest point");
        }
        return ret;
    }
}

export default { PickPointControler }

